An electronic oscillator is an electronic circuit that produces a repetitive electronic signal, often a sine wave or a square wave. Electronic oscillators are widely used in many different electronic circuits, and virtually every device controlled by a computer or microcontroller uses an electronic oscillator.
A crystal oscillator is an electronic circuit that uses the mechanical resonance of a vibrating crystal of piezoelectric material to create an electrical signal with a very precise frequency. This frequency is commonly used to keep track of time (as in quartz wristwatches), to provide a stable clock signal for digital integrated circuits, and to stabilize frequencies for radio transmitters. Using an amplifier and feedback, it is an especially accurate form of an electronic oscillator. The crystal used therein is sometimes called a “timing crystal”.
A first conventional crystal oscillator circuit 100 is shown in FIG. 1. The first conventional oscillator circuit 100 comprises a crystal 110, a variable-gain amplifier 120 having an input 122 coupled to a first side 112 of the crystal 110 and having an output 124 coupled to a second side 114 of crystal 110, and having a variable gain control 125. The circuit 100 further comprises a comparator 130 having a first input 132 coupled to the first side 112 of the crystal 110 and having an output 134 coupled to the variable gain control 125 of amplifier 120, a reference voltage 140 (Vref) is coupled to a second input 136 of comparator 130.
The function of circuit 100 is to regulate the size of a voltage signal across the crystal 110. If the voltage signal gets too large, unwanted harmonic content will result, and the excessive amplitude may degrade the lifetime of the crystal The comparator 130 comprises a peak detect function capable of detecting a positive or a negative peak value, a buffer function to buffer the positive or the negative peak value, and a compute function to determine the difference between the positive or negative peak value and the reference voltage 140. The reference voltage 140 provides a reference against which a voltage on the first side 112 of the crystal is compared to determine if the oscillation amplitude voltage produced by the crystal corresponds with the reference voltage 140.
The circuit 100 operates in the following manner. The oscillation amplitude voltage of crystal 110 is detected by comparator 130, compared with reference voltage 140, and the gain 125 of amplifier 120 is adjusted to bring the two voltages to parity. The comparator 130 and amplifier 120 together form an amplitude control network which multiplies the error between the signal amplitude from crystal 110 and the voltage reference 140 by a gain factor 125 via the amplifier 120. The output of amplifier 120 is filtered using a passive network to produce the control characteristic dominant pole and then applied to the amplifier gain.
A second conventional crystal oscillator circuit 200 is shown in FIG. 2. The circuit 200 comprises a crystal 210 having a first side 212 and a second side 214. First side 212 (node Xin) is coupled through first capacitor 216 to ground. Second side 214 (node Xout) which is coupled through second capacitor 218 to ground.
Circuit 200 further comprises an amplifier 220 having an input 222 coupled to node Xin 212, and an output 224 coupled to node Xout 218. Amplifier 220 further comprises a gain control input 225. Amplitude detector 230 has an input 232 coupled to input 222 of amplifier 220. Output 224 of amplifier 220 is coupled through a first resistor 260 to input 232 of the amplitude detector. Amplitude detector 230 produces an output 234 which is coupled to error amplifier 250.
Circuit 200 further comprises an error amplifier 250 having a first input 252 coupled to output 234 of amplitude detector 230. Voltage reference (Vref) 240 is coupled to input 256 of error amplifier 250. Output 254 of error amplifier 250 is coupled through second resistor 270 to a first side 282 of third capacitor 280, which has a second side 284 coupled to ground. The resistor 270 and third capacitor 280 form a low pass filter. First side 282 of capacitor 280 is coupled by a feedback loop to input 225 of the amplifier 220.
FIG. 2 operates in the following manner. Within the amplitude detect 230, only the peak-to-average signal magnitude is used to produce a signal proportional to oscillation amplitude. The average voltage changes with changing amplifier gain 225 producing positive feedback, therefore the error amplifier 230 contains a replica circuit to cancel this positive feedback in order to avoid instability. This technique generally does not work for error amplifier gains in excess of approximately 1.
Disadvantages of the conventional solution include that high power consumption and significant die area are required to achieve a high spectral purity signal. Furthermore, the conventional circuit 100 continuously couples noise from the reference signal onto the oscillator 110, resulting in phase noise on the oscillator output. While it is undesirable to produce excessive oscillation magnitude, regulating the crystal oscillation may produce undesirable phase noise, or an large investment in power and area devoted to noise reduction.
It would be desirable to have an oscillator controller with lower phase noise, lower power consumption and lower area use and where the magnitude of oscillations across the oscillator can be controlled.